

namespace ODataValidator.RuleEngine.Common
{
    /// <summary>
    /// Class to keep cross-component constants
    /// </summary>
    public static class Constants
    {
        /// <summary>
        /// http header Content-Type for json-formatted payload
        /// </summary>
        public const string ContentTypeJson = @"application/json";

        /// <summary>
        /// Regular expression for json content type
        /// </summary>
        public const string RegexContentTypeJson = @"application/json";

        /// <summary>
        /// http header Content-Type for atom-formatted payload
        /// </summary>
        public const string ContentTypeAtom = @"application/atom+xml";

        /// <summary>
        /// Regular expression for atompub content type
        /// </summary>
        public const string RegexContentTypeAtom = @"application/atom\+xml";

        /// <summary>
        /// http header Content-Type for xml-formatted payload
        /// </summary>
        public const string ContentTypeXml = @"application/xml";

        /// <summary>
        /// Regular expression for xml content type
        /// </summary>
        public const string RegexContentTypeXml = @"application/xml";

        /// <summary>
        /// http header Cpontent-Type for text/xml
        /// </summary>
        public const string ContentTypeTextXml = @"text/xml";

        /// <summary>
        /// Regular expression for text content type
        /// </summary>
        public const string RegexContentTypeTextXml = @"text/xml";

        /// <summary>
        /// http header Cpontent-Type for image/*
        /// </summary>
        public const string ContentTypeImage = @"image/.*";

        /// <summary>
        /// Regular expression for image content type
        /// </summary>
        public const string RegexContentTypeImage = @"image/.*";

        /// <summary>
        /// appendix segment to OData service base uri for endpoint of metadata document
        /// </summary>
        public const string OptionMetadata = "/" + Constants.Metadata;

        /// <summary>
        /// keyword of metadata document
        /// </summary>
        public const string Metadata = "$metadata";

        /// <summary>
        /// http request header Accept to expect atom/xml response
        /// </summary>
        public const string AcceptHeaderAtom = @"*/*; q=0.2, application/atom+xml, application/xml; q=0.5";

        /// <summary>
        /// http request header Accept to expect json response
        /// </summary>
        public const string AcceptHeaderJson = @"application/json";

        /// <summary>
        /// expecting request context to be atom/xml format
        /// </summary>
        public const string FormatAtomOrXml = "atompub";

        /// <summary>
        /// expecting request context to be json format
        /// </summary>
        public const string FormatJson = "json";

        /// <summary>
        /// classification of success
        /// </summary>
        public const string ClassificationSuccess = "success";

        /// <summary>
        /// classification of error
        /// </summary>
        public const string ClassificationError = "error";

        /// <summary>
        /// classification of warning
        /// </summary>
        public const string ClassificationWarning = "warning";

        /// <summary>
        /// classification of recommendation
        /// </summary>
        public const string ClassificationRecommendation = "recommendation";

        /// <summary>
        /// classification of not-applicable
        /// </summary>
        public const string ClassificationNotApplicable = "notApplicable";

        /// <summary>
        /// classification of aborted
        /// </summary>
        public const string ClassificationAborted = "aborted";

        /// <summary>
        /// The default target uri string of offline service context. 
        /// This is pretty much an dummy string serving as a placeholder of offline context.
        /// </summary>
        public const string DefaultOfflineTarget = "http://offline";
    }
}
